import 'package:flutter/material.dart';

Stack StackCards(Color bgcolor, bool img , double height) {
  return Stack(
    children: [
      Container(
        margin: EdgeInsets.symmetric(vertical: 10),
        padding: EdgeInsets.all(30),
        height: height,
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(20),
          color: bgcolor,
        ),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Row(
              children: [
                Image.asset(
                  'images/home/NexusPay Logo.png',
                  width: 22,
                  height: 22,
                ),
                SizedBox(
                  width: 8,
                ),
                Text(
                  'Duch Bangla Bank',
                  style: TextStyle(color: Colors.white, fontSize: 16),
                ),
              ],
            ),
            Container(
              alignment: Alignment.topLeft,
              child: const Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text(
                    '**** **** ****   1690',
                    style: TextStyle(color: Colors.white, fontSize: 16),
                  ),
                  SizedBox(
                    height: 8,
                  ),
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text(
                        'Platinum   Plus',
                        style: TextStyle(color: Colors.white, fontSize: 16),
                      ),
                      Text(
                        'Exp 01/22',
                        style: TextStyle(color: Colors.white, fontSize: 16),
                      ),
                    ],
                  )
                ],
              ),
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Text(
                  'Exp 01/22',
                  style: TextStyle(color: Colors.white, fontSize: 16),
                ),
                img == false
                    ? Image.asset(
                        'images/allcards/Visa_Inc._logo.png',
                        width: 62,
                        height: 20,
                      )
                    : Column(
                        children: [
                          Image.asset(
                            'images/allcards/Group 3.png',
                            height: 28,
                          ),
                          Text(
                            'mastercard',
                            style: TextStyle(fontSize: 8, color: Colors.white),
                          )
                        ],
                      ),
              ],
            )
          ],
        ),
      ),
      Positioned(
        top: -5,
        right: -40,
        child: Opacity(
          opacity: .1,
          child: Image.asset(
            'images/allcards/Visa_Inc._logo.png',
            height: 80,
          ),
        ),
      ),
    ],
  );
}
